<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=<device-width>, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 400px;
            height: 400px;
            /* 默认平铺 */
            background-image: url('../img/2023031114585708.jpg');
            /* 不平铺 */
            background-repeat: no-repeat;
            /* 位置 */
            background-position: center;
            /* 大小 */
            /* cover可能导致图片显示不全 */
            /* contain可能导致盒子有露白 */
            background-size: cover;
            /* 背景图固定 */
            /* background-attachment: fixed; */
        }
    </style>
</head>
<body>
    <div>
        background-image
    </div>
</body>
</html>